﻿using System.ComponentModel.DataAnnotations;

namespace ITTestingSystem.Domain.Entities
{
    /// <summary>
    /// Determines the properties of the answers entity to question
    /// </summary>
    /// 
    public class Answer
    {
        /// <summary>
        /// Primary key of the answers entity in database table
        /// </summary>
        /// 
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// Text of answer to question
        /// </summary>
        /// 
        [Required]
        public string Text { get; set; }

        /// <summary>
        /// Foreign key for the questions entity in the answers table
        /// </summary>
        /// 
        [Required]
        public int QuestionId { get; set; }

        /// <summary>
        /// Determines whether the answer is correct
        /// </summary>
        /// 
        [Required]
        public bool IsCorrectAnswer { get; set; }




        /// <summary>
        /// Returns the questions entity for this answer
        /// </summary>
        /// 
        public virtual Question Question { get; set; }
    }
}
